/************************************************************************
 * <br>
 * <ul>
 * <li>版权所有：唐山弘川科技有限公司 2009－2020</li>
 * <li>创建日期：2009-8-12</li>
 * <li>初始作者：刘川</li>
 * </ul>
 * <ul>
 * <b>修订历史</b>
 * <li>1、</li>
 * </ul>
 ***********************************************************************/
package com.hy.erp.inventory.pojo ;

import javax.persistence.Column ;
import javax.persistence.Entity ;
import javax.persistence.FetchType ;
import javax.persistence.ManyToOne ;
import javax.persistence.Table ;

import org.hibernate.annotations.Index ;
import org.jboss.seam.ScopeType ;
import org.jboss.seam.annotations.Name ;
import org.jboss.seam.annotations.Scope ;

import com.hy.erp.inventory.dao.interfaces.IPostcodeDao;
import com.hy.erp.inventory.pojo.interfaces.IPostcode;
import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.api.annotation.DaoA;
import com.hy.erp.inventory.vsoft.libra.enterprise.framework.persistence.entity.AbstractPersistentEntity;
/**
 * 
 * <ul>
 * <li>开发作者：李冰</li>
 * <li>设计日期：2010-10-5；时间：下午04:25:35</li>
 * <li>类型名称：Postcode</li>
 * <li>设计目的：</li>
 * </ul>
 * <ul>
 * <b>修订编号：</b>
 * <li>修订日期：</li>
 * <li>修订作者：</li>
 * <li>修订原因：</li>
 * <li>修订内容：</li>
 * </ul>
 */

//@ Entity 
/*@Name("postcode")
@Scope(ScopeType.SESSION)
@Table(name="postcode")
@DaoA(IPostcodeDao.class)*/
public class  Postcode extends AbstractPersistentEntity implements IPostcode
{
	private static final long	serialVersionUID	=
	                                                  - 1018928677097156204L ;



	/**
	 * 构造函数
	 */
	public Postcode ( )
	{
		super ( ) ;
	}
	@ManyToOne(targetEntity=Area.class,fetch=FetchType.LAZY)
	public Area getArea ( )
	{
		return this.get(IPostcode.AREA);
	}

	public void setArea (
							Area area )
	{
		super.set ( IPostcode.AREA , area );
	}
	@ManyToOne(targetEntity=City.class,fetch=FetchType.LAZY)
	public City getCity ( )
	{
		return this.get(IPostcode.CITY);
	}

	public void setCity (
							City city )
	{
		super.set ( IPostcode.CITY , city );
	}
	@ManyToOne(targetEntity=Country.class,fetch=FetchType.LAZY)
	public Country getCountry ( )
	{
		return this.get(IPostcode.COUNTRY);
	}

	public void setCountry (
								Country country )
	{
		super.set ( IPostcode.COUNTRY , country );
	}
	@ManyToOne(targetEntity=County.class,fetch=FetchType.LAZY)
	public County getCounty ( )
	{
		return this.get(IPostcode.COUNTY);
	}

	public void setCounty (
							County county )
	{
		super.set ( IPostcode.COUNTY , county );
	}
	@ Column ( name = "postcode" , length = 50 )
	@ Index ( name = "postcodeIndex" )
	public String getPostcode ( )
	{
		return this.get(IPostcode.POSTCODE);
	}

	public void setPostcode (
								String postcode )
	{
		super.set ( IPostcode.POSTCODE , postcode );
	}
	@ManyToOne(targetEntity=Province.class,fetch=FetchType.LAZY)
	public Province getProvince ( )
	{
		return this.get(IPostcode.PROVINCE);
	}

	public void setProvince (
								Province province )
	{
		super.set ( IPostcode.PROVINCE , province );
	}
	

	public Postcode (
						
						Area area ,
						City city ,
						Country country ,
						County county ,
						String postcode ,
						Province province )
	{
		super ( ) ;
		
		
	}

	
}
